<?php
/**
 * regd by PhpStorm.
 * User: lee
 * Date: 2017/11/29
 * Time: 17:31
 */

namespace Biz\validate;


class ShopContactInfo extends \Doraemon\pockets\validate\Base {


    public static function rules() {
        return [
            ['name','required',null,'请填写联系人姓名',['signup','insert','modify']],
            ['name','length', '2,50', '请正确填写联系人姓名', ['signup','insert','modify']],
            ['name','regex',['pattern'=>'/^[\x{4e00}-\x{9fa5}_\-a-zA-Z0-9]+$/u'],'请正确填写联系人姓名',['signup','insert','modify']],


            ['position','required',null,'请正确填写联系人职务',['signup','insert','modify']],
            ['position','length','1,20','请正确填写联系人职务',['signup','insert','modify']],
            ['position','regex',['pattern'=>'/^[\x{4e00}-\x{9fa5}_\-a-zA-Z0-9]+$/u'],'请正确填写联系人职务',['signup','insert','modify']],

            ['mobile','required',null,'请填写手机号',['signup','insert','modify']],
            ['mobile','between', '13000000000,19999999999', '手机号错误', ['signup','insert','modify']],
        ];

    }

}